import QtQuick

Rectangle {
    width: 200
    height: 300
    color: "#FFFFFF"

    Column {
        anchors.centerIn: parent
        spacing: 15

        Row {
            spacing: 10
            Rectangle {
                width: 40
                height: 40
                color: "red"
            }
            Text {
                height: 40
                text: "使用命名颜色: red"
                font.pixelSize: 16
                verticalAlignment: Qt.AlignVCenter
            }
        }

        Row {
            spacing: 10
            Rectangle {
                width: 40
                height: 40
                color: "#23FF45"
            }
            Text {
                height: 40
                text: "使用十六进制颜色: #23FF45"
                font.pixelSize: 16
                verticalAlignment: Qt.AlignVCenter
            }
        }

        Row {
            spacing: 10
            Rectangle {
                width: 40
                height: 40
                color: Qt.rgba(0, 0, 1, 0.5)
            }
            Text {
                height: 40
                text: "使用 RGBA 颜色: (0, 0, 1, 0.5)"
                font.pixelSize: 16
                verticalAlignment: Qt.AlignVCenter
            }
        }

        Row {
            spacing: 10
            Rectangle {
                width: 40
                height: 40
                color: "#23FF45AA"
            }
            Text {
                height: 40
                text: "使用 RGBA 十六进制: #23FF45AA"
                font.pixelSize: 16
                verticalAlignment: Qt.AlignVCenter
            }
        }
    }
} 
